package com.woniuxy.servicelayer;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.dal.entity.Comment;
import com.woniuxy.dal.entity.Ranges;
import com.woniuxy.servicelayer.vo.CommentVo;
import com.woniuxy.servicelayer.vo.DetailVo;

import java.util.List;
import java.util.Map;

/**
* @author rjq51
* @description 针对表【range(靶场表)】的数据库操作Service
* @createDate 2023-03-27 17:02:43
*/
public interface RangeService extends IService<Ranges> {

    int addRange(Ranges range);

    int delRange(Integer rangeId);

    int updateRange(Ranges range);

    Page<Ranges> selectRange(Integer currentPage, Integer pageSize, String keyword,Integer order,Integer type);

    Page<Ranges> selectRangeCope(Integer currentPage, Integer pageSize, String keyword);

    List<Ranges> classificationQuery(Integer typeId);

    Ranges getRange(Object id);

    Integer addVisitCount(Object rangeId);

    DetailVo queryDetailStats(Object rangeId, String token);

    List<CommentVo> fetchComments(Object rangeId);

    void sendComment(Object rangeId, Object token, Object comment);

//    void addTest(Object rangeId, Object token,Object status);

    String generateFlag(Object rangeId,String token);

    Integer queryFlag(Object flag,String token);


    //======
    Ranges getRangeById(Integer rangeId);
}
